package com.example.star.api_service;

import com.example.star.entity.Favorite;
import com.example.star.entity.Perimeter;
import com.example.star.entity.ShoppingCart;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ApiFavorite {
    @POST("favorites")
    Call<Favorite> saveFavorite(@Body Favorite favorite);
    @GET("favorites")
    Call<List<Favorite>> getFavorites();

    @GET("favorites/items-by-user")
    Call<List<Favorite>> getFavoriteByuserName(@Query("userName") String userName);

    @DELETE("favorites/delete")
    Call<Void> deleteFavorite(@Query("userName") String userName, @Query("title") String title);

    @GET("favorites/check")
    Call<Boolean> checkFavorite(@Query("userName") String userName, @Query("title") String title);

}
